#include <iostream>

int main() {
  std::freopen("oi.in", "r", stdin);
  std::freopen("oi.out", "w", stdout);
  std::cin.tie(nullptr)->sync_with_stdio(false);
  int t;
  std::cin >> t >> t;
  while (t--) {
    int n;
    std::cin >> n >> n;
    for (int i = 1; i <= n; ++i) {
      int x;
      std::cin >> x >> x;
    }
    std::cout << 2 - n - n << " 0\n";
  }
  return 0;
}